package com.chezhujie.www.core.quartz;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.text.ParseException;
import java.util.Date;

/**
 * 删除车票订单为待支付的订单
 * @author alvis
 *
 */
@Component
public class UpdateOrder {
	@Value("${updateOrder.onOff}")
	 private boolean onOff = false;  
	 @Scheduled(cron="${updateOrder.cron}")  
	 public void execute() throws ParseException{
		 if (onOff){
			AppMap.updateOrderStatus(new Date());
			
		}
	 }

	 
}
